Problems with tag O(logn) ~ O(n)